﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Fit2ModelsFluent;
using FluentNHibernate.Mapping;

namespace Fit2ModelsFluent.Mappings
{
    public class QuestionMap : ClassMap<Question>
    {
        public QuestionMap()
        {
            Table("Question");
            Id(x => x.QuestionId);
            Map(x => x.QuestionName);
            Map(x => x.QuestionText);
            Map(x => x.RecordStatus);
            Map(x => x.InsertBy);
            Map(x => x.InsertDate);
            Map(x => x.SortOrder);
            Map(x => x.UpdateBy);
            Map(x => x.UpdateDate);
            HasManyToMany(x => x.Answers).Cascade.All().Table("MapQuestionAnswer");

        }
    }
}
